package com.zxcl;

import com.zxcl.model.AliPayModel;
import com.zxcl.pay.PayService;
import lombok.extern.log4j.Log4j2;

import java.util.Map;

@Log4j2
public class Test02Pay {
//fw7svw.natappfree.cc
    public static void main(String[] args) {
        String outTradeNo="ORDER_MALL_005";
        String subject="MALL商品的支付订单";
        String totalAmount="10";
        String notifyUrl="http://tjfrba.natappfree.cc/callBack";
        AliPayModel aliModel=new AliPayModel(outTradeNo,subject,totalAmount,notifyUrl);
        Map<String, Object> map = PayService.pay(aliModel);
        Object code = map.get("code");
        if(code.equals("200")){
            String qrCode = map.get("qrCode").toString();
            System.out.println(qrCode);
        }else{
            System.out.println("唤起支付失败");
        }
    }
}
